package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName(value = "product")
public class Product {
    @TableId(value = "pid",type = IdType.AUTO)
    private Integer pid;
    private String pname;
    private String picture;
    private String unitprice;
    private String content;
    private Integer tid;
    private String place;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date addtime;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date finishtime;
    private String nutrients;
    private String brand;
    private Integer sid;
    private Integer vid;
    @TableField(exist = false)
    private Integer count;
    @TableField(exist = false)
    private Integer damage;
    @TableField(exist = false)
    private Integer kcount;
    @TableField(exist = false)
    private String tname;
    @TableField(exist = false)
    private String vname;
}
